<div class="user-content">
            <present name="list">
            <div class="tab-content">
                <table class="table pure-table pure-table-horizontal">
                    <thead>
                        <tr>
                            <th>捐赠订单号</th>
                            <th>捐赠日期</th>
                            <th>支付渠道</th>
                            <th>捐赠额</th>
                            <th>捐赠状态</th>
                            <th>操作</th>
                            <!-- <th width="10%">操作</th> -->
                        </tr>
                    </thead>
                    <tbody>
                        <volist name='list' id='vo'>
                            <tr>
                                <td>{$vo.id}</td>
                                <td>{$vo.donate_date|date='Y-m-d H:i:s',###}</td>
                                <td>{$vo.channel_name}</td>
                                <td>￥{$vo.total_amount}</td>
                                <td>{$vo.status_name}</td>
                                <td nowrap><a href="#" class="pure-button button-more show-detail" data-id="{$vo.id}">查看明细</a>
                                    <eq name="vo.status" value="0">&nbsp;<a href="{:addons_url('Donate://Donate/donate', array('id' => $vo['id']))}" class='pure-button button-more'>继续支付</a>&nbsp;<a onclick="doDel({$vo.id}); return false" class='pure-button button-more'>取消订单</a></eq>
                                </td>
                            </tr>
                            <input type='hidden' class="donator_info_{$vo.id}" value='{:json_encode($vo["donator_info"])}'>
                            <input type="hidden" class="mail_type_{$vo.id}" value='{$vo.mail_type_name}'>
                            <input type='hidden' class='bill_title_{$vo.id}' value='{$vo.bill_title}'>
                            <volist name='vo.donate_detail' id='detail'>
                                <input type='hidden' class="donate_detail_{$vo.id}" value='{:json_encode($detail)}'>
                            </volist>
                        </volist>
                    </tbody>
                </table>
                <nav class="text-center">
                    <include file="../app/Admin/View/default/common/pagination.html" />
                </nav>
            </div>
            <else />
            <p class="empty-list">暂无记录，快去参与捐赠吧</p>
            </present>
        </div>
    <div class="modal fade" id="deleteModal" tabindex="-1" role="dialog" aria-hidden="true">
        <div class="modal-dialog modal-sm">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title">取消捐赠订单</h4>
                </div>
                <div class="modal-body">
                    <p>
                        <h5>确定要取消捐赠订单吗</h5></p>
                </div>
                <div class="modal-footer">
                    <button id='delete_btn' class="btn btn-danger">确认</button>
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                </div>
            </div>
        </div>
    </div>
    <div class="modal fade" id="showDetailModal" tabindex="-1" role="dialog" aria-hidden="true">
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title">捐赠订单明细</h4>
                </div>
                <div class="modal-body" id="showDetailBody">
                </div>
            </div>
        </div>
    </div>
        <script src="__PUBLIC__/libs/modal.js"></script>
        <script>
    function doDel(id) {
        $('#deleteModal').modal('show');
        $('#delete_btn').on('click', function() {
            $('.close').click();
            //ajaxlink($(this), "{:U('/home/support/donateCancel')}" + '?id=' + id);
            window.location = "{:addons_url('Donate://Donate/donateCancel')}" + '?id=' + id;
        });
    }

    jQuery(document).ready(function($) {
        $('.show-detail').on('click', function(e) {
            e.preventDefault();
            var donator_info = $('.donator_info_' + $(this).data('id')).val();
            var donator = {};
            donator = jQuery.parseJSON(eval(decodeURI(donator_info)));
            var html_string = '<p>捐赠人信息</p><hr /><p>姓名： ' + donator.name + '</p>' + '<p>称谓： ' + donator.prefix + '</p><p>电子邮箱： ' + donator.email + '</p>' + '<p>手机： ' + donator.telephone + '</p><p>地址： ' + donator.address + '</p>' + '<p>邮编： ' + donator.mail_code + '</p>';

            html_string += '<p>捐赠收据： ' + $('.mail_type_' + $(this).data('id')).val() + '</p>' + '<p>收据抬头： ' + $('.bill_title_' + $(this).data('id')).val() + '</p>'

            var detail_html_string = '<table class="table pure-table"><thead><tr><td>行号</td><td>捐赠类型</td><td>名称</td><td>捐赠金额</td></tr></thead><tbody>';
            $('.donate_detail_' + $(this).data('id')).each(function() {
                var detail_info = $(this).val();
                var detail = {};
                detail = jQuery.parseJSON(detail_info);
                detail_html_string += '<tr><td>' + detail.line_no + '</td><td>' + detail.key_name + '</td><td>' + detail.ref_name + '</td><td>' + detail.amount + '</td></tr>';
            });
            detail_html_string += '</tbody></table>';
            $('#showDetailBody').html(html_string + detail_html_string);
            $('#showDetailModal').modal('show');
        });
    })
    </script>
